let state = {
    countB:0
  }
let mutations = {
    incB(state){
        console.log(state)
    }
  }
let actions = {
    asyncIncB(context){
        context.commit('incB')
        console.log(context)
    },
    asyncDecB({commit}){
        commit('inc')
    },
    acB(context){
        context.dispatch('acA',{name:'aaa'},{root:true})//调用模块A的actions
    }
  }
let getters = {
    countGB(state){
      return state.countB +=100
    }
  }

export const moduleB = {
    namespaced:true,
    state,
    mutations,
    actions,
    getters
}